<?php

/**
 *  @FileComment            [前台订单和订单列表用户评论视图模型]
 *  @ProjectName             项目名称：JDshop
 *  @FileName                   文件名称：OrderOrderListCommentUserViewModel.class.php
 *  @Author                       yuerengui <596580041@qq.com>
 *  @Date                          2014-10-23 1:28:41
 *  *
 */
class OrderOrderListCommentUserViewModel extends ViewModel {

        public $table = 'user';
        public $view = array(
            'orderinfo' => array('_type' => 'INNER'),
            'order_list' => array('_type' => 'INNER', '_on' => '__orderinfo__.oid=order_list.order_oid'),
            'comment' => array('_type' => 'INNER', '_on' => '__order_list__.olid=comment.order_list_olid'),
            'user' => array('_type' => 'INNER', '_on' => '__orderinfo__.user_uid=user.uid'),
        );

        public function get_data($gid) {
                return $this->where('goods_gid=' . $gid)->all();
        }

}
